import {httpDelete, httpGet, httpPageableGet, httpPost, httpPut} from '@/utils/request'


export async function findOne( id:any ){
  const {data, success}  = await httpGet(`/api/v1/pipeline/findOne/${id}` )
  return {data, success};
}

export async function list( params?:any ){
  const { data,total }  = await httpPageableGet('/api/v1/pipeline/list',params)
  return { data,total };
}

export async function update( params?:any ){
  const { code }  = await httpPut('/api/v1/pipeline/modify',params)
  return code === 200;
}

export async function create( params?:any ){
  const { code }  = await httpPost('/api/v1/pipeline/create',params)
  return code === 200;
}

export async function deleteById( id:any ){
  const { code }  = await httpDelete(`/api/v1/pipeline/delete/${id}` )
  return code === 200;
}

